Recently, we have been working on this coordinate transformation task, which involves many profound things such as surveyors. Here I will not explain these difficult theories. Here, I will post the code to share with you. In fact, if you want to
Math is a mathematical class in Java, which records many of them.ProgramMathematical aspects to be used, such as two constants:
The circumference rate of the math. Pi record
Math. E records the constant of E.
Math has some similar constants,
The circumference rate of the Math. PI record
Math. E records the constant of e.
Math has some similar constants, which are commonly used in Engineering Mathematics.
Math. abs evaluate absolute value
Math. sin sine function Math. asin arcsin
A Brief Introduction to the Number and Math classes in Java, numbermath
Java Number
Generally, when a number is required, we usually use a built-in data type, such:Byte, int, long, double.
Instance:
1 int a = 5000;2 float b = 13.65f;3 byte c = 0x4a;
package day06;
/****** Demo of the Math class* Math class:* The 1,math class is final* The construction method of 2,math is private (cannot be manually new)* The method provided by 3,math is static (all can be called)* Common methods:* ABS:
The circumference rate of the math. Pi record
Math. E & nbsp; record the constant of E
Math has some similar constants, which are commonly used in Engineering Mathematics.
Math. Abs evaluate absolute valueMath. Sin sine function & nbsp; math.
Java Number & Math classGenerally, when you need to use numbers, we usually use built-in data types, such as:byte, int, long, double , and so on.Instanceint float byte c = 0x4a;However, in the actual development process, we often encounter
Math classJava.lang.Math provides a series of static methods for scientific calculation, the parameters and return value types of the methods are generally double, if more powerful mathematical ability to calculate the relevant content in higher
First, the Math classJava.lang.Math provides a series of static methods for scientific calculation, and the parameters and return value types of the methods are generally double type.ABS AbsoluteAcos,asin,atan,cos,sin,tan Trigonometric Functionssqrt
4.2 Common mathematical functionsThe methods in the math class are divided into three categories: trigonometric functions, exponential function Methods , and service methods . Service methods include rounding, minimum, maximum, Absolute and random
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.